﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Topro.Application.Interface
{
    using Topro.Entity;
    using Topro.Entity.Query;
    using Topro.Entity.Request.Product;
    using Topro.Entity.Response.Product;

    /// <summary>
    /// 物料业务接口
    /// </summary>
    public interface ProductService
    {
        /// <summary>
        /// 获取物料
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        ProductResponse Get(int? id);

        /// <summary>
        /// 更新状态
        /// </summary>
        /// <returns></returns>
        JResult UpdateStatus(int id, int status);

        /// <summary>
        /// 保存、修改
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult SaveProduct(ProductSaveRequest request);

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataGrid<ProductQueryResponse> GetPager(ProductQuery query);

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataGrid<ProductQueryResponse> ProductQuery(ProductQuery query);
    }
}
